Relax the check for ignoring events above the content view
authorRichard Hult <richard@imendio.com>
Tue, 3 Feb 2009 15:14:33 +0000 (16:14 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:32 +0000 (10:15 +0200)
gdk/quartz/gdkevents-quartz.c

index 3ea4ad074a09ce147969d2b24a3048774b5b7f66..1c3a177185ae5fbc42d8bfc65b2b62ae6228f554 100644 (file)
@@ -519,11 +519,14 @@ find_window_for_ns_event (NSEvent *nsevent,
          {
            /* The non-grabbed case. */
 
-            /* Leave events above the window (e.g. possibly on the titlebar)
-             * to cocoa.
+            /* Ignore all events but mouse moved that might be on the title
+             * bar (above the content view). The reason is that otherwise
+             * gdk gets confused about getting e.g. button presses with no
+             * window (the title bar is not known to it).
              */
-            if (*y < 0)
-              return NULL;
+            if (event_type != NSMouseMoved)
+              if (*y < 0)
+                return NULL;
 
             /* FIXME: Also need to leave resize events to cocoa somehow? */